<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box{
			width:200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
		}

	</style>
	<script type="text/javascript">
		window.onload = function () {

			var box = document.getElementById('box');
			//获取外部的样式
			width = window.getComputedStyle ? window.getComputedStyle(box,null).width : box.currentStyle.width; 


			alert(width);



			var btn  = document.getElementById('btn');

			btn.ondblclick = function(){
				box.style.background="blue";
			}
			box.onmouseover = function(){
				box.style.width="300px";
			}
			box.onmouseout = function(){
				box.style.width="200px";
			}
			box.onclick = function(){
				box.style.display='none';
			}
			
		}
	</script>
</head>
<body>
	<input type="button" id="btn" value="点我吧">
	<div class="box"  id="box">学并思</div>
</body>
</html>